<template>
  <div class="app-container">
    <!-- 头部 -->
    <Find :OriginalFilter="{ static: true }" :formList="formList" @findClicked="findData" />

    <!-- 主体 -->
    <el-card shadow="never" :body-style="{ padding: '10px' }" class="mt10">
      <div slot="header" class="f16">
        <span style="font-weight: 600">入库明细查询</span>
      </div>
      <Table :tableData="tableData" :tableHeader="tableHeader" :TableHeight="120" class="mt10" />
      <PageModule :PageData="{ total }" />
    </el-card>
  </div>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue'
import JMessage from '@/utils/JMessage'
export default defineComponent({
  name: 'QueryConsumablesInWarehouse'
})
</script>
<script lang="ts" setup>
import { i18n, Jzhcn } from '@/i18n'
const formList = ref([
  {
    type: 'input',
    inputPlaceholder: '请输入入库单号',
    inputValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入送货单号',
    inputValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入材料编码',
    inputValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入材料名称',
    inputValue: ''
  },
  {
    type: 'select',
    selectValue: '部门',
    selectLabel: '',
    selectOptions: []
  },
  {
    type: 'select',
    selectValue: '厂商',
    selectLabel: '',
    selectOptions: []
  },
  {
    type: 'select',
    selectValue: '分类',
    selectLabel: '',
    selectOptions: []
  },
  {
    type: 'select',
    selectValue: '入库原因',
    selectLabel: '',
    selectOptions: []
  },
  {
    type: 'date',
    dateLabel: '入库日期',
    dateValue: ''
  },
  {
    type: 'date',
    dateLabel: '送货日期',
    dateValue: ''
  },
  {
    type: 'button',
    checkboxLabel: '导出'
  }
])
const findData = (data: any) => {
  console.log(data)
}
// 表格数据
const tableData = [
  {
    date: '20230427',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-02',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-04',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312',
    customer: 'jzy',
    checkboxArrange: true
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  }
]

const tableHeader = ref([
  {
    label: '入库单号',
    prop: 'customer'
  },
  {
    label: '入库日期',
    prop: 'instruction'
  },
  {
    label: '入库原因',
    prop: 'shape'
  },
  {
    label: '送货日期',
    prop: 'shape'
  },
  {
    label: '送货单号',
    prop: 'shape'
  },
  {
    label: '部门名称',
    prop: 'shape'
  },
  {
    label: '厂商名称',
    prop: 'shape'
  },
  {
    label: '物料编号',
    prop: 'shape'
  },
  {
    label: '材料颜色',
    prop: 'shape'
  },
  {
    label: '材料名称',
    prop: 'shape',
    width: '300px'
  },
  {
    label: '规格',
    prop: 'shape'
  },
  {
    label: '单位',
    prop: 'shape'
  },
  {
    label: '数量',
    prop: 'shape'
  },
  {
    label: '单价',
    prop: 'shape'
  },
  {
    label: '金额',
    prop: 'shape'
  },
  {
    label: '备注',
    prop: 'shape'
  },
  {
    label: '仓管员',
    prop: 'shape'
  }
])

// 分页器
const currentPage = ref(1)
const pageSize = ref(10)
const total = ref(658)
const handleSizeChange = (val: number) => {
  console.log(`${val} items per page`)
}
const handleCurrentChange = (val: number) => {
  console.log(`current page: ${val}`)
}
</script>

<style lang="less" scoped>
// 主体样式
.ProductionDynamicMain {
  width: 100%;
  height: 670px;
  margin-top: 20px;

  .ProductionDynamicMainCard {
    width: 100%;
    height: 100%;
    box-shadow: none;
  }
}

.ProductionDynamicMainCardMain {
  width: 98%;
  height: 550px;
  display: flex;
  margin: auto;

  .ProductionDynamicMainCardMainLeft {
    width: 100%;
  }
}

.ProductionDynamicMainCardBottom {
  width: 98%;
  height: 20px;
  margin: auto;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
}

.MainLeftCardH1 {
  font-size: 16px;
  margin: 10px 0 10px 0;
}

.ProductionDynamicMainCardMainRightTDivOne {
  width: 100%;
  height: 45%;
}

.ProductionDynamicMainCardBottomT {
  width: 98%;
  height: 70px;
  margin: auto;
  margin-top: 20px;
}

.ProductionDynamicMainCardMainbottom {
  width: 98%;
  height: 30px;
  display: flex;
  margin: auto;
  margin-top: 35px;
  justify-content: space-between;
}
</style>
